Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

buble

Package Overview
Dependencies
Maintainers
4
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buble

The blazing fast, batteries-included ES2015 compiler

  • 0.19.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
262K
increased by50.78%
Maintainers
4
Weekly downloads
 
Created

What is buble?

Bublé is a JavaScript compiler that takes your ES2015+ code and turns it into code that can run in older browsers. It is designed to be fast and to produce compact output.

What are buble's main functionalities?

Transpiling ES6 to ES5

Bublé can transpile modern ES6+ syntax to ES5, making it compatible with older browsers. This example shows how an arrow function is transformed into a regular function.

const buble = require('buble');
const result = buble.transform(`const add = (a, b) => a + b;`);
console.log(result.code); // 'var add = function (a, b) { return a + b; };'

Source Maps

Bublé can generate source maps, which are useful for debugging. This example shows how to generate a source map for the transformed code.

const buble = require('buble');
const result = buble.transform(`const add = (a, b) => a + b;`, { source: 'input.js', file: 'output.js' });
console.log(result.map);

Custom Transforms

Bublé allows you to customize which transformations to apply. This example shows how to disable the transformation of ES6 classes.

const buble = require('buble');
const result = buble.transform(`class Person { constructor(name) { this.name = name; } }`, { transforms: { classes: false } });
console.log(result.code);

Other packages similar to buble

Keywords

FAQs

Package last updated on 03 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc